//导入路由创建的相关的方法
import {createRouter, createWebHashHistory} from "vue-router";

//导入vue组件
import Home from "../components/Home.vue";
import List from "../components/List.vue";
import Add from "../components/Add.vue";
import Update from "../components/Update.vue";
import ShowDetail from "../components/ShowDetail.vue";
import ShowDetail2 from "../components/ShowDetail2.vue";
//创建路由的对象，声明的规则


const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        {
            path:'/',
            component:Home
        },
        {
            path:'/list',
            component:List
        },
        {
            path:'/add',
            component:Add
        },
        {
            path:'/update',
            component:Update
        },
        {
            path:'/showDetail/:id/:language',
            component:ShowDetail
        },
        {
            path:'/showDetail2',
            component:ShowDetail2
        },
    ]
})
//对外暴露出来
export default router;